import { QuestionType, Difficulty } from '@prisma/client';

// 作业配置条件
export interface HomeworkCriteria {
  subject: string;
  gradeLevel: number;
  topics: string[];
  difficulty: Difficulty;
  questionCount: {
    multipleChoice: number;
    openEnded: number;
  };
  estimatedDuration: number; // 分钟
  excludeQuestionIds?: string[];
}

// 作业问题
export interface HomeworkQuestion {
  title: string;
  content: string;
  type: QuestionType;
  difficulty: Difficulty;
  choices?: string[];
  correctAnswer: string;
  explanation: string;
  points: number;
  knowledgePoints?: string[];
}

// 作业模板
export interface HomeworkTemplate {
  id: string;
  title: string;
  description: string;
  instructions: string;
  sections: Array<{
    type: QuestionType;
    count: number;
    points: number;
  }>;
  defaultCriteria?: Partial<HomeworkCriteria>;
}

// AI服务生成作业的响应
export interface HomeworkGenerationResponse {
  questions: HomeworkQuestion[];
  template: HomeworkTemplate;
}

// 作业模板响应
export interface HomeworkTemplateResponse {
  templates: HomeworkTemplate[];
}
